
# uses R 4.0.3; ggplot2 will not load in R 3.6.2

library(ggplot2)
id <-c(1:400)
out<-data.frame(Demo.growth)
out<- data.frame(id,out)
write.xlsx(out, "U://My Documents//demogrowth.xls")

zz <- file.path("U:","My Documents")
File.Location <- file.path(zz,"demogrowth.csv")
out <- read.csv(File.Location)
out <- data.frame(out)
outlong<-reshape(out,
                 varying=c("t1","t2","t3","t4"),
                 timevar="time",
                 idvar="id",
                 direction="long",sep="")
ggplot(data=outlong,aes(x=time,y=t,group=id))+
  ggtitle("Trajectories: Raw data") +
  xlab("Time")+
  ylab("Score")+
  geom_line() +
  geom_line(data=outlong,aes(x=time,y=t,group=id),color="red",size=2)

>>>>>>>>>>>>>>>>>
colnames(out)<-c("pred3","pred5","pred8")
out$ID<-eclsk$id